# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Francois Charette <firmicus@gmx.net>

pkgname=perl-tie-hash-indexed
pkgver=0.08
pkgrel=2
pkgdesc="Ordered hashes for Perl"
arch=('loong64' 'x86_64')
url="https://search.cpan.org/dist/Tie-Hash-Indexed"
license=('GPL' 'PerlArtistic')
depends=('perl')
options=('!emptydirs')
source=(https://www.cpan.org/authors/id/M/MH/MHX/Tie-Hash-Indexed-${pkgver}.tar.gz)
sha256sums=('37bc62815f5a848ac77912b9bf4788a9f272884e83a52e2093dab4a83a4a7b10')

build() {
  cd  Tie-Hash-Indexed-${pkgver}

  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor

  make
}

package() {
  cd  Tie-Hash-Indexed-${pkgver}

  make install DESTDIR="$pkgdir"

  find "$pkgdir" -name '.packlist' -delete
  find "$pkgdir" -name '*.pod' -delete
}
